#include "collisionrectangle.h"

#include <QPainter>

CollisionRectangle::CollisionRectangle(QDeclarativeItem *parent)
    : CollisionObject(parent)
{
    setFlag(QGraphicsItem::ItemHasNoContents, false);
}

void CollisionRectangle::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
                        QWidget *widget)
{
    Q_UNUSED(option)
    Q_UNUSED(widget)

    if (debug())
    {
        painter->save();
        painter->setPen(Qt::black);
        painter->setBrush(Qt::green);
        painter->drawRect(0, 0, width(), height());
        painter->restore();
    }
}
